import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import routes from './router/index.js'

import { _http } from './utils/http';
import _comm from './utils/common';
import storage from '@/utils/storage';

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import './assets/css/base.scss';
import './assets/css/element-variables.scss'

import customPagination from './components/customPagination';

const router = new VueRouter({
  mode: 'hash',
  routes: routes
})

Vue.use(VueRouter);
Vue.use(ElementUI);
//重写message只显示最新一个
import resetMessage from './utils/message';
Vue.prototype.$message = resetMessage;
Vue.use(customPagination);

Vue.prototype._http = _http; //api调用方式
Vue.prototype._comm = _comm; //公共方法使用
Vue.prototype._storage = storage;

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
